package com.base.myproject.server.tools;

import java.math.BigDecimal;

public class RPTString2Double {
	public static String string2String(String str) {
		String d = str == null ? "" : String.valueOf(new BigDecimal(Double.parseDouble(str)).setScale(2,BigDecimal.ROUND_HALF_UP));
		return d;
	}
	
	public static String double2String(double d) {
		String str = String.valueOf(new BigDecimal(d).setScale(2,BigDecimal.ROUND_HALF_UP));
		return str;
	}
	
	/*public static Double string2Double(String str) {
		return Double.parseDouble(str);
	}*/
}
